import express from 'express'
import axios from 'axios'

const app = express()
const router = express.Router()

app.use('/api', router)

router.get('/list', async (req, res) => {
    const result = await axios.get('https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=chinaDayList,chinaDayAddList,cityStatis,provinceCompare,statisGradeCityDetail,diseaseh5Shelf')
    console.log(result)
    res.json({
        data: result.data.data
    })
})

app.listen('3001', () => {
    console.log('server run localhost:3001')
})